#获取收货文件
import sys
sys.path.append("..")
import json
from flask import request
from db_client import *

def get_receive_file():
        receive_file = []        
        get_id = request.args.get('id')
        result = mysql_client.get_receive_file(get_id)
        for re in result:
                t = {
                        "receive_count" : re[0],
                        "item_id" : re[1],
                        "receive_date" : re[2],
                        "id" : re[3],
                        "order_id" : re[4],
                        "content" : re[5],
                        "receive_staff_id" : re[6]
                }
                receive_file.append(t)
        data = receive_file
        return json.dumps(data,ensure_ascii=False)